# max函数，注释
# def max(*args, key=None):  # known special case of max
#     """
#     max(iterable, *[, default=obj, key=func]) -> value
#     max(arg1, arg2, *args, *[, key=func]) -> value
#
#     With a single iterable argument, return its biggest item. The
#     default keyword-only argument specifies an object to return if
#     the provided iterable is empty.
#     With two or more arguments, return the largest argument.
#     """
#     pass
print('max函数，参数是元组类型'.center(30, '#'))
tuple_type = (1, 2, 3, 9, 8, 7, 6)
print(max(tuple_type, key=None))

print('max函数，参数是list类型'.center(30, '#'))
list_type = [11, 22, 33, 99, 88, 77, 66]
print(max(list_type, key=None))

print('max函数，参数是dict类型'.center(30, '#'))
dict_type = {"4": "6", "3": "7", "7": "3", "9": "1", "1": "9", "2": "8"}
print(max(dict_type.keys(), key=dict_type.get))
print(max(dict_type, key=dict_type.get))

print('max函数，参数是list类型'.center(30, '#'))
all_number = [1200, 1, -2, -3, -5, -99, 99, -1300]
print(max(all_number))
print(max(all_number, key=abs))




